package br.edu.ufcg.ga.stopcondition;

public class MaxGenerationsStopCondition extends StopCondition {

	private int maxGenerations;

	public MaxGenerationsStopCondition(int maxGenerations) {
		this.maxGenerations = maxGenerations;
	}

	@Override
	protected boolean workIsDone(int cGeneration, double cBestFitness) {
		return this.maxGenerations == cGeneration;
	}

}